﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GrayParrot.Web.Controls//.Datatables.Filters
{
    [Serializable]
    //[TypeConverter(typeof(ExpandableObjectConverter))]
    public class DateColumnFilter : ColumnFilter
    {
        private bool m_isRange = false;

        public bool IsRange
        {
            get { return m_isRange; }
            set 
            { 
                m_isRange = value;

                if (m_isRange)
                {
                    this.Type = FilterTypes.DateRange;
                }
            }
        }

        public string DateFormat { get; set; }

        public DateColumnFilter()
        {
            this.Type = FilterTypes.Date;
        }
    }
}
